1. Field of the Invention
The present invention relates to a distance-measuring device, and to a camera provided with a distance-measuring device.
2. Description of the Prior Art
A distance-measuring device measures a distance on the principle of triangulation or the like, and is used, for example, in an automatic focusing (AF) mechanism of a camera. One known method adopted in a distance-measuring device is the passive-type correlation method, which exploits the image of an object intact without emitting light for distance measurement. The principle of this distance measurement method will be described below.
FIG. 6A shows an example of a distance-measuring device adopting the passive-type correlation method, and FIG. 6B shows an example of the signal obtained from the image sensor, realized by the use of a CCD, provided in this distance-measuring device. The light emanating from an object 24 and transmitted through two lenses 20 provided on the right and on the left is focused onto the light-sensing surface of a one-dimensional CCD 23 to form two images thereon along a straight line by means of mirrors 21 and a prism 22. The CCD 23 outputs an image signal as shown in FIG. 6B, where the position on the CCD 23 is taken along the vertical axis and the level of the image signal is taken along the horizontal axis. The distance between the two images varies according to the distance to the object. Accordingly, by subjecting the image signal to correlation calculation, it is possible to determine the distance between the two images and, on the basis of this distance, determine the distance to the object. This is the principle of the passive-type correlation method.
Conventionally, the majority of distance-measuring devices adopting the passive-type correlation method for use in cameras achieve distance measurement by the use of an image sensor having a row of pixels that extends only in the horizontal direction of the screen. For this reason, for example when a portrait is shot, the photographer first locks the focus with the person to be photographed caught within the distance measurement area shown in the viewfinder so as to determine the composition, and then releases the shutter.
To eliminate the need to lock the focus, a distance-measuring device is proposed that employs an area sensor having an array of pixels that extends in both the horizontal and vertical directions so as to sense part or the whole of the shooting field on an area-by-area basis. In a distance-measuring device of this type, distance calculation is performed by the use of signals obtained from specific regions (calculation regions) corresponding to each other on a pair of area sensors. FIGS. 7 and 8 show examples of the relationship between the area sensor and a calculation region in a distance-measuring device of this type.
FIG. 7 shows the above-mentioned relationship as observed when the camera is held in such a posture that the direction of the shorter sides of the shooting screen coincides with the vertical direction of the object (hereafter, this posture of a camera will be referred to as the "horizontal posture"). FIG. 8 shows the same relationship as observed when the camera is held in such a posture that the direction of the longer sides of the shooting screen coincides with the vertical direction of the object (hereafter, this posture of a camera will be referred to as the "vertical posture").
The sensor unit 10 has left-hand and right-hand area sensors 11L' and 11R' and a sensor controller 12 for controlling those area sensors 11L' and 11R'. The smaller areas L'(n) and R'(n) (where n represents a natural number from 1 to 9) within the area sensors 11L' and 11R' are calculation regions demarcated by the sensor controller 12. Note that any two calculation regions bearing the same number n correspond to each other, and distance measurement data is calculated by the use of image signals obtained from mutually corresponding calculation regions.
With a camera provided with such an area-sensor-based distance-measuring device, distance measurement can be performed in varying areas, and accordingly the photographer can release the shutter without locking the focus. In achieving automatic focusing, different cameras adopt different methods of selecting the calculation regions from which to obtain distance measurement data to be used to perform focusing. For example, there is a method that places the calculation regions in the order of priority so that, from among the calculation regions from which distance measurement data can be obtained, the data obtained from those given the highest priority is selected.
However, in a conventional area-sensor-based distance-measuring device adopting the passive-type correlation method, all the calculation regions are of the same size irrespective of their positions. Therefore, in some cases, the object can be inappropriately large or small relative to the calculation regions, and this is a major cause of low distance measurement accuracy. Examples of such cases will be described below with reference to FIGS. 9 to 11. In these examples, it is assumed that the object (i.e. the main object) of which the distance needs to be measured is a person. In these figures, reference numeral 13 represents the area of the shooting screen, reference numeral 14 represents a calculation region, and reference numeral 15 represents the main object.
FIG. 9 shows a case in which the main object 15 is inappropriately small relative to the calculation region 14. In such a case, the main object (a person) coexists with the objects (trees) in the background within the calculation region 14, making it impossible to measure the distance to the main object 15 accurately. Such a situation is called foreground/background interference.
FIG. 10 shows a case in which the main object 15 is inappropriately large relative to the calculation region 14. In such a case, the main object 15 shows low contrast within the calculation region 14, reducing the reliability of distance measurement. Such a situation is called low contrast.
FIG. 11 shows a case in which the main object 15 is appropriately large relative to the calculation region 14. In such a case, there is little influence of the background within the calculation region 14, and the main object 15 shows contrast above an appropriate level. Thus, it is possible to measure the distance appropriately.
Note that, in FIGS. 9 to 11, how the relationship between the size of the calculation region 14 and the size of the object 15 varies is illustrated by varying the size of the calculation region 14 while keeping the size of the object 15 constant within the shooting screen 13. However, in reality, as long as the same object is shot with the same camera, as the distance to the object varies, the size of the object varies while the size of the calculation region 14 remains constant, and as a result the relationship between the size of the calculation region 14 and the size of the object 15 varies. This is because, on the shooting screen, the same object appears small when it is far away and appears large when it is close.
As described above, conventionally, the size of the object can sometimes be inappropriately large or small relative to the calculation regions, causing foreground/background interference or low contrast. This often leads to low distance measurement accuracy, or to improper selection of calculation regions in automatic focusing.